<!DOCTYPE html>
<html>
<head>
    <title>Swagger explorer</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!--[if lt IE 9]>
        <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
    <!--style type="text/css"></style-->
    <link href="css/index.css" rel="stylesheet" />
    <link href='css/standalone.css' rel='stylesheet' />
    <link href='css/api-explorer.css' rel='stylesheet' type='text/css' />
    <link href='css/screen.css' media='screen' rel='stylesheet' type='text/css' />
    %(StylesheetsHtml)
    <script src='lib/jquery-1.8.0.min.js' type='text/javascript'></script>
    <script src='lib/jquery.slideto.min.js' type='text/javascript'></script>
    <script src='lib/jquery.wiggle.min.js' type='text/javascript'></script>
    <script src='lib/jquery.ba-bbq.min.js' type='text/javascript'></script>
    <script src='lib/handlebars-2.0.0.js' type='text/javascript'></script>
    <script src='lib/underscore-min.js' type='text/javascript'></script>
    <script src='lib/backbone-min.js' type='text/javascript'></script>
    <script src='swagger-ui.js' type='text/javascript'></script>
    <script src='lib/jsoneditor.js' type='text/javascript'></script>
    <script src='lib/highlight.7.3.pack.js' type='text/javascript'></script>
    <script src='lib/marked.js' type='text/javascript'></script>
    <script src='lib/swagger-oauth.js' type='text/javascript'></script>
    <script src='lib/bootstrap.min.js' type='text/javascript'></script>
<script src="lang/translator.js" type="text/javascript"></script>
<script src='lang/zh-cn.js' type='text/javascript'></script>


    <script type="text/javascript">
        jQuery.browser = jQuery.browser || {};
        (function () {
            jQuery.browser.msie = jQuery.browser.msie || false;
            jQuery.browser.version = jQuery.browser.version || 0;
            if (navigator.userAgent.match(/MSIE ([0-9]+)\./)) {
                jQuery.browser.msie = true;
                jQuery.browser.version = RegExp.$1;
            }
        })();
    </script>
    <script type="text/javascript">
        window.JSConfig = JSON.parse('%(JSConfig)');
        $(function () {
            window.swaggerUi = new SwaggerUi({
                url: JSConfig.SwaggerEndpoints[0].Url,
                validatorUrl: JSConfig.ValidatorUrl,
                booleanValues: JSConfig.BooleanValues,
                dom_id: "swagger-ui-container",
                supportedSubmitMethods: JSConfig.SupportedSubmitMethods,
                onComplete: function (swaggerApi, swaggerUi) {
                    if (typeof initOAuth == "function") {
                        initOAuth({
                            clientId: JSConfig.OAuth2ClientId,
                            clientSecret: JSConfig.OAuth2ClientSecret,
                            realm: JSConfig.OAuth2Realm,
                            appName: JSConfig.OAuth2AppName,
                            scopeSeparator: JSConfig.OAuth2ScopeSeparator,
                            additionalQueryStringParams: JSConfig.OAuth2AdditionalQueryStringParams
                        });
                    }

                    $('pre code').each(function (i, e) {
                        hljs.highlightBlock(e);
                    });

                    if (swaggerUi.options.url) {
                        $('#input_baseUrl').val(swaggerUi.options.url);
                    }
                    if (swaggerUi.options.apiKey) {
                        $('#input_apiKey').val(swaggerUi.options.apiKey);
                    }

                    $("[data-toggle='tooltip']").tooltip();

                    addApiKeyAuthorization();

                    _.each(JSConfig.OnCompleteScripts, function (script) {
                        $.getScript(script);
                    });

                    if (window.SwaggerTranslator) {
                        window.SwaggerTranslator.translate();
                    }
                },
                onFailure: function (data) {
                    log("Unable to Load SwaggerUI");
                },
                jsonEditor: JSConfig.JsonEditor,
                defaultModelRendering: 'schema',
                showRequestHeaders: JSConfig.ShowRequestHeaders,
                sorter: "alpha"
            });

            function addApiKeyAuthorization() {
                var key = encodeURIComponent($('#input_apiKey')[0].value);
                if (key && key.trim() != "") {
                    var apiKeyAuth = new SwaggerClient.ApiKeyAuthorization("Authorization", "Bearer " + key, "header");
                    window.swaggerUi.api.clientAuthorizations.add("key", apiKeyAuth);
                    log("added key " + key);
                }
            }

            $('#input_apiKey').change(addApiKeyAuthorization);
            // if you have an apiKey you would like to pre-populate on the page for demonstration purposes...
            /*
             var apiKey = "myApiKeyXXXX123456789";
             $('#input_apiKey').val(apiKey);
             */

            window.swaggerUi.load();

            function log() {
                if ('console' in window) {
                    console.log.apply(console, arguments);
                }
            }
        });
    </script>
    <script type="text/javascript">

        $(function() {
            $(window).scroll(function() {
                var sticky = $(".sticky-nav");
                i(sticky);
                r(sticky);

                function n() {
                    return window.matchMedia("(min-width: 992px)").matches;
                }

                function e() {
                    n()
                        ? sticky.parents(".sticky-nav-placeholder").removeAttr("style")
                        : sticky.parents(".sticky-nav-placeholder").css("min-height", sticky.outerHeight());
                }

                function i(n) {
                    n.hasClass("fixed") || (navOffset = n.offset().top);
                    e();
                    $(window).scrollTop() > navOffset
                        ? $(".modal.in").length || n.addClass("fixed")
                        : n.removeClass("fixed")
                }

                function r(e) {
                    function i() {
                        var i = $(window).scrollTop(), r = e.parents(".sticky-nav");
                        return r.hasClass("fixed") && !n() && (i = i + r.outerHeight() + 40), i;
                    }

                    function r(e) {
                        var t = o.next("[data-endpoint]"), n = o.prev("[data-endpoint]");
                        return "next" === e
                            ? t.length
                            ? t
                            : o.parent().next().find("[data-endpoint]").first()
                            : "prev" === e
                            ? n.length
                            ? n
                            : o.parent().prev().find("[data-endpoint]").last()
                            : [];
                    }

                    var nav = e.find("[data-navigator]");
                    if(nav.find("[data-endpoint][data-selected]").length) {
                        var o = nav.find("[data-endpoint][data-selected]"),
                            a = $("#" + o.attr("data-endpoint")),
                            s = a.offset().top,
                            l = (s + a.outerHeight(), r("next")),
                            u = r("prev");
                        if(l.length) {
                            {
                                var d = $("#" + l.attr("data-endpoint")), f = d.offset().top;
                                f + d.outerHeight();
                            }
                            i() >= f && c(l);
                        }
                        if(u.length) {
                            var p = $("#" + u.attr("data-endpoint")),
                                g = u.offset().top;
                            v = (g + p.outerHeight(), 100);
                            i() < s - v && c(u);
                        }
                    }
                }

                function s() {
                    var e = $(".sticky-nav [data-navigator]"),
                        n = e.find("[data-endpoint]").first();
                    n.attr("data-selected", "");
                    u.find("[data-selected-value]").html(n.text());
                }

                function c(e) {
                    {
                        var n = $(".sticky-nav [data-navigator]");
                        $("#" + e.attr("data-endpoint"));
                    }
                    n.find("[data-resource]").removeClass("active");
                    n.find("[data-selected]").removeAttr("data-selected");
                    e.closest("[data-resource]").addClass("active");
                    e.attr("data-selected", "");
                    sticky.find("[data-selected-value]").html(e.text());
                }
            });
        });
    </script>
    <script type="text/javascript">
        $(function () {
            $("[data-toggle='tooltip']").tooltip();
        });
    </script>
</head>
<body class="page-docs" style="zoom: 1;">
    <section class="content">
        <div id="api2-explorer">
            <div class="swagger-section page-docs" style="zoom: 1">
                <div class="main-section">
                    <div id="swagger-ui-container" class="swagger-ui-wrap">
                    </div>
                </div>
            </div>
        </div>
    </section>
</body>
</html>
